const getters = {
  // 写全
  // sidebar:function(state){
  //   return state.app.sidebar
  // }
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 目的是封装到全局 访问时路径短一点
  // 原来是this.$store.state.token
  token: state => state.user.token,
  // 封装name
  name: state => state.user.userInfo.username,
  staffPhoto: state => state.user.userInfo.staffPhoto,
  // 封装公司id
  companyId: state => state.user.userInfo.companyId,
  routes: state => state.permission.routes,
  roles: state => state.user.userInfo.roles
}
export default getters
